import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/Layout'


const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: "/home",/*重定向/的路由*/
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('../views/Home'),
      }
    ]

  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login')

  },
  {
    path: '/Register',
    name: 'Register',
    component: () => import(/* webpackChunkName: "about" */ '../views/Register')

  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
